#include "button_base.h"

button_base::button_base(QWidget *parent) : QLabel(parent)
{
    
}

void button_base::Set_Image(QString Image_path)
{
    //设定图像
    this->M_Image = QImage(Image_path);
    //更新图像
    this->update();
}

void button_base::Set_Text(QString Text)
{
    //设定图像
    this->M_Text = Text;
    //更新图像
    this->update();
}

void button_base::update_start(int Mode)
{
    //更新状态
    this->Mode = Mode;
    //更新会话
    this->update();
}

void button_base::mousePressEvent(QMouseEvent *event)
{
    if(event->buttons() & Qt::LeftButton){
        event->accept();
    }
}


